package cn.jingsheng.backup.bean;

import java.sql.Timestamp;

/**
 * 报备系统详细信息
 * 
 * @author 李晓丹
 * 
 */
public class BackupFile {
	// 主键
	private String id;
	// 文件别名
	private String aliasFileName;
	// 公司名
	private String company;
	// 报备时间
	private Timestamp createTime;
	// 报备人
	private String createUser;
	// 关键字
	private String searchKey;
	// 文件类型
	private String fileType;
	// 是否可编辑
	private boolean editable;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getAliasFileName() {
		return aliasFileName;
	}

	/**
	 * 上传文件名
	 * 
	 * @param aliasFileName
	 */
	public void setAliasFileName(String aliasFileName) {
		this.aliasFileName = aliasFileName;
		if (this.aliasFileName == null) {
			return;
		}
		// 设置文件类型
		int point = this.aliasFileName.lastIndexOf(".");
		if (point > 0) {
			fileType = this.aliasFileName.substring(point + 1).toUpperCase();
		} else {
			fileType = "未知";
		}
	}

	public boolean isEditable() {
		return editable;
	}

	public void setEditable(boolean editable) {
		this.editable = editable;
	}

	public String getCompany() {
		return company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public Timestamp getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}

	public String getCreateUser() {
		return createUser;
	}

	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}

	public String getSearchKey() {
		return searchKey;
	}

	public void setSearchKey(String searchKey) {
		this.searchKey = searchKey;
	}

	public String getFileType() {
		return fileType;
	}

	public void setFileType(String fileType) {
		this.fileType = fileType;
	}

}
